package com.robotserver.orders.mapper;

import com.robotserver.orders.entity.VipTokens;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Auther: jianghan
 * @Date: 2020/12/2 11:03
 * @Description:
 */
@Repository
public interface VipTokensMapper {
    VipTokens getByOpenId(@Param("openId") String openId);

    VipTokens getByAccessToken(@Param("accessToken") String accessToken);

    void update(VipTokens vipToken);

    void add(VipTokens vipToken);

    int getCount(@Param("time") int time);

    List<VipTokens> getTokens(@Param("time") int time, @Param("index") int index,@Param("size") int size);

    void updateHeartbeat(@Param("id") Long id,@Param("time") int time);

    List<VipTokens> getAllTokens(@Param("time") int time);
}
